<?php
namespace Home\Controller;
use Think\Controller;
class CommonController extends Controller {
    Public function _initialize(){
    	if (ismobile()) {
            $this->redirect('login/model');
        }else{
	        $access = \Org\Util\Rbac::AccessDecision();
	        // if(!$access){
	        //     $this->error('你没有权限1',1,'Mwlogin/index');
	        // }
	        if (!isset($_SESSION[C('USER_AUTH_KEY')])) {
	            $this->redirect('Login/index');
	        }
	    }
    }
}?>